<%@ Page language="c#" EnableViewState="false" Codebehind="EditHub.aspx.cs" AutoEventWireup="false" Inherits="CommunityServer.ControlPanel.HubAdmin.EditHub" MasterPageFile="~/ControlPanel/Masters/HubAdmin.master" %>

<asp:Content ContentPlaceHolderId="DescriptionRegion" runat="server">
	Edit Group
</asp:Content>

<asp:Content ContentPlaceHolderId="TaskRegion" runat="Server">
    <CP:ControlPanelSelectedNavigation SelectedNavItem="ManageHubs" runat="server" />

	<DIV class="CommonDescription">
		<CP:ResourceControl ID="ResourceControl1" runat="server" ResourceName="CP_HubAdmin_SectionEdit_Edit_Description" />
	</DIV>

    <CSHub:EditHubForm runat="server" SubFormIds="ForumConfiguration,BlogConfiguration,MediaConfiguration,Avatar"
        ApplicationKeyTextBoxId="AppKey" 
        HubTypeRadioButtonListId="HubType" 
        GroupDropDownListId="HubGroup" 
        DescriptionEditorId="HubDescription" 
        NameTextBoxId="HubName" 
        SubmitButtonId="Save">
        <SuccessActions>
            <CSControl:GoToSiteUrlAction UrlName="hub_ControlPanel_AdminHubs" runat="server" />
        </SuccessActions>
        <FormTemplate>
        
            <TWC:TabbedPanes id="EditorTabs" runat="server"
	            PanesCssClass="CommonPane"
	            TabSetCssClass="CommonPaneTabSet"
	            TabCssClasses="CommonPaneTab"
	            TabSelectedCssClasses="CommonPaneTabSelected"
	            TabHoverCssClasses="CommonPaneTabHover"
	            >
	            <TWC:TabbedPane runat="server">
		            <Tab><CSControl:ResourceControl runat="server" ResourceName="Hubs_Options" /></Tab>
		            <Content>
		                <table cellspacing="0" cellpadding="0" border="0">
		                
		                    <tr>
		                        <td class="CommonFormFieldName">
		                            <CSControl:ResourceControl ResourceName="Name" runat="server" Tag="Strong" /><br />
		                            The name of this group.
		                        </td>
		                        <td class="CommonFormField"><asp:TextBox runat="server" ID="HubName" Columns="40" /> <asp:RequiredFieldValidator runat="server" ControlToValidate="HubName" Cssclass="validationWarning">*</asp:RequiredFieldValidator></td>
		                    </tr>
		                    
		                    <tr>
	                            <td class="CommonFormFieldName">
		                            <strong>URL</strong><br />
		                            Unique value used to identify this group. This value should not be changed. White spaces will be changed to "_". Only numbers, letters, "-", and "_" are valid characters.
	                            </td>
	                            <td class="CommonFormField">
		                            <asp:Literal runat="server" ID="AppKeyUrlPrefix" /><asp:TextBox runat="server" ID="AppKey" Columns="20" /><asp:Literal runat="server" ID="AppKeyUrlSuffix" />
	                            </td>
                            </tr>
		                    
		                    <tr>
		                        <td colspan="2">
		                            <div class="CommonFormFieldName">
		                                <CSControl:ResourceControl ResourceName="Description" runat="server" Tag="Strong" /><br />
		                                The description of this group.    
		                            </div>
		                            <div class="CommonFormField"><CSControl:Editor runat="server" ID="HubDescription" Height="150px" /></div>
		                        </td>
		                    </tr>

                            <tr>
                                <td class="CommonFormFieldName">
                                    <CSControl:ResourceControl ResourceName="Hubs_Type" runat="server" Tag="Strong" /><br />
                                    The membership and visibility setting for this group.
                                </td>
                                <td class="CommonFormField"><asp:RadioButtonList runat="server" ID="HubType" /> <asp:RequiredFieldValidator runat="server" ControlToValidate="HubType" Cssclass="validationWarning">*</asp:RequiredFieldValidator></td>
                            </tr>
                            
                            <CSControl:PlaceHolder runat="server">
                                <DisplayConditions><CSControl:ControlPropertyValueComparison ComparisonControlId="HubGroup" ComparisonProperty="Items" Operator="GreaterThan" ComparisonValue="1" runat="server" /></DisplayConditions>
                                <ContentTemplate>
                                    <tr>
                                        <td class="CommonFormFieldName">
                                            <CSControl:ResourceControl ResourceName="Hubs_Group" runat="server" Tag="Strong" /><br />
                                            The category identifies where this group will be categorized in aggregate group lists.
                                        </td>
                                        <td class="CommonFormField"><asp:DropDownList runat="Server" ID="HubGroup" /></td>
                                    </tr>
                                </ContentTemplate>
                            </CSControl:PlaceHolder>

                        </table>
                    </Content>
                </TWC:TabbedPane>
                <TWC:TabbedPane runat="server">
		            <Tab ID="AvatarPane"><CSControl:ResourceControl runat="server" ResourceName="Hubs_AvatarOptions" /></Tab>
		            <Content>
                        <CSHub:HubAvatarSubForm ID="Avatar" runat="server" ControlIdsToHideWhenNotVisible="AvatarPane" DeleteAvatarButtonId="DeleteAvatar" UploadAvatarHtmlInputFileId="UploadAvatar">
                            <FormTemplate>
                                <div class="CommonFormFieldName">
                                    <CSHub:HubAvatar runat="server" ShowDefaultAvatar="false" />
                                </div>

                                <div class="CommonFormField">
                                    <table cellpadding="0" cellspacing="0" border="0">
                                    <tr valign="bottom">
                                        <td>
	                                        <CSControl:resourcecontrol runat="server" resourcename="Hubs_AvatarOptions_Upload" /><br />
        	                                <input type="file" runat="server" id="UploadAvatar" />
                                        </td>
                                        <td align="right" style="padding-left: 32px;">
	    	                                <CSControl:ResourceButton runat="server" ResourceName="Delete" ID="DeleteAvatar" />
                                        </td>
                                    </tr>
                                    </table>	
                                </div>
                            </FormTemplate>
                        </CSHub:HubAvatarSubForm>
                    </Content>
                </TWC:TabbedPane>
                <TWC:TabbedPane runat="server">
		            <Tab ID="ForumPane"><CSControl:ResourceControl runat="server" ResourceName="Hubs_ForumOptions" /></Tab>
		            <Content>
                        <CSForum:HubForumConfigurationSubForm runat="server" ID="ForumConfiguration" ControlIdsToHideWhenNotVisible="ForumPane"
                            EnableForumCheckBoxId="EnableForum" 
                            EnableModerationCheckBoxId="EnableModeration" 
                            MembersCanCreateThreadsCheckBoxId="MembersCanCreateThreads"
                            SubFormIds="ForumMailingListConfiguration">
                            <FormTemplate>
                                
                                <table cellpadding="0" cellspacing="0" border="0">
                            
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="ForumAdmin_IsActive" runat="server" Tag="Strong" /><br />
		                                    Select 'Yes' to enable the forum within this group.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableForum" /></td>
		                            </tr>

                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="Hubs_EnableForumModeration" runat="server" Tag="Strong" /><br />
		                                    Enable moderation of members forum posts.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableModeration" /></td>
		                            </tr>
                                
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="Hubs_EnableMemberCreateThreads" runat="server" Tag="Strong" /><br />
		                                    Enable members to create new forum threads.  If set to 'No', members can only reply to existing threads.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="MembersCanCreateThreads" /></td>
		                            </tr>
                                
                                    <CSMail:HubForumMailingListConfigurationSubForm runat="server" ID="ForumMailingListConfiguration"
							            EnableMailGatewayId="EnableForumMailGateway"
							            ForumEmailAddressId="ForumEmailAddress"
							            ForumEmailValidatorId="ForumEmailValidator">
							            <DisplayConditions>
								            <CSControl:SiteSettingsPropertyComparison ComparisonProperty1="EnableMailGateway" Operator="issetortrue" runat="server" />
							            </DisplayConditions>
							            <FormTemplate>
    							        
							                <tr>
		                                        <td class="CommonFormFieldName">
		                                            <CSControl:ResourceControl ResourceName="Hubs_EnableEmailForum" runat="server" Tag="Strong" /><br />
		                                            Enable this groups forum to be accessed as a mailing list.
		                                        </td>
		                                        <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableForumMailGateway" /></td>
		                                    </tr>
    							        
								            <tr>
		                                        <td class="CommonFormFieldName">
		                                            <CSControl:ResourceControl ResourceName="Hubs_ForumMailAddress" runat="server" Tag="Strong" /><br />
		                                            Identify the email address used for this groups forums mailing list.		                                            
		                                        </td>
		                                        <td class="CommonFormField">
													<asp:TextBox runat="server" ID="ForumEmailAddress" Columns="15" /> @<CSControl:SiteSettingsData ID="SiteSettingsData1" Property="MailGatewayEmailDomain" runat="server" />
													<asp:RegularExpressionValidator id="emailRegExValidator" runat="server" ControlToValidate="ForumEmailAddress" ValidationExpression="\w+([-+.]\w+)*">*</asp:RegularExpressionValidator>
													<asp:customvalidator id="ForumEmailValidator" runat="server" controltovalidate="ForumEmailAddress" font-bold="True" errormessage="*"></asp:customvalidator>
												</td>
		                                    </tr>

							            </FormTemplate>
                                    </CSMail:HubForumMailingListConfigurationSubForm>
                                
                                </table>
                            </FormTemplate>
                        </CSForum:HubForumConfigurationSubForm>
                    </Content>
                </TWC:TabbedPane>
                <TWC:TabbedPane runat="server">
		            <Tab ID="BlogPane"><CSControl:ResourceControl runat="server" ResourceName="Hubs_BlogOptions" /></Tab>
		            <Content>
                        <CSBlog:HubWeblogConfigurationSubForm runat="server" ID="BlogConfiguration" ControlIdsToHideWhenNotVisible="BlogPane"
                                    EnableWeblogCheckBoxId="EnableBlog" 
                                    EnableWeblogCommentsCheckBoxId="EnableBlogComments"
                                    EnableWeblogRatingsCheckBoxId="EnableBlogRatings"
                                    EnableWeblogTrackbacksCheckBoxId="EnableBlogTrackbacks"
                                    SubFormIds="BlogMailingListConfiguration">
                            <FormTemplate>
                            
                                <table cellpadding="0" cellspacing="0" border="0">
                                
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="BlogSettings_IsEnabled" runat="server" Tag="Strong" /><br />
		                                    Select 'Yes' to enable the blog within this group.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableBlog" /></td>
		                            </tr>
                            
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="BlogSettings_EnableComments" runat="server" Tag="Strong" /><br />
		                                    Enable comments on posts within this groups blog.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableBlogComments" /></td>
		                            </tr>
                                
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="BlogSettings_EnableRatings" runat="server" Tag="Strong" /><br />
		                                    Enable ratings on posts within this groups blog.    
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableBlogRatings" /></td>
		                            </tr>
                                
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="BlogSettings_EnableTrackbacks" runat="server" Tag="Strong" /><br />
		                                    Enable trackbacks on posts within this groups blog.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableBlogTrackbacks" /></td>
		                            </tr>
                                
                                    <CSMail:HubBlogMailingListConfigurationSubForm runat="server" ID="BlogMailingListConfiguration"
							            EnableMailGatewayId="EnableBlogMailGateway">
							            <DisplayConditions>
								            <CSControl:SiteSettingsPropertyComparison ComparisonProperty1="EnableMailGateway" Operator="issetortrue" runat="server" />
							            </DisplayConditions>
							            <FormTemplate>
							                <tr>
		                                        <td class="CommonFormFieldName">
		                                            <CSControl:ResourceControl ResourceName="Hubs_EnableEmailBlog" runat="server" Tag="Strong" /><br />
		                                            Enable sending email to post to this groups blog.
		                                        </td>
		                                        <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableBlogMailGateway" /></td>
		                                    </tr>
							            </FormTemplate>
                                    </CSMail:HubBlogMailingListConfigurationSubForm>
                                    
                                </table>
                            </FormTemplate>
                        </CSBlog:HubWeblogConfigurationSubForm>
                    </Content>
                </TWC:TabbedPane>
                <TWC:TabbedPane runat="server">
		            <Tab ID="MediaPane"><CSControl:ResourceControl runat="server" ResourceName="Hubs_FileOptions" /></Tab>
		            <Content>
                        <CSMedia:HubMediaGalleryConfigurationSubForm runat="server" ID="MediaConfiguration" ControlIdsToHideWhenNotVisible="MediaPane"
                            EnableMediaGalleryCheckBoxId="EnableMedia" 
                            EnableModerationCheckBoxId="EnableModeration" 
                            MembersCanAddFilesCheckBoxId="MembersCanUpload">
                            <FormTemplate>
                                <table cellpadding="0" cellspacing="0" border="0">
                            
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="Hubs_EnableFiles" runat="server" Tag="Strong" /><br />
		                                    Select 'Yes' to enable the media gallery within this group.    
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableMedia" /></td>
		                            </tr>
                            
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="Hubs_EnableFilesModeration" runat="server" Tag="Strong" /><br />
		                                    Enable moderation of members media uploads.    
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="EnableModeration" /></td>
		                            </tr>
                                
                                    <tr>
		                                <td class="CommonFormFieldName">
		                                    <CSControl:ResourceControl ResourceName="Hubs_EnableMemberUploadFiles" runat="server" Tag="Strong" /><br />
		                                    Enable members to upload media.
		                                </td>
		                                <td class="CommonFormField"><CSControl:YesNoCheckBox runat="server" ID="MembersCanUpload" /></td>
		                            </tr>
                                
                                </table>
                            </FormTemplate>
                        </CSMedia:HubMediaGalleryConfigurationSubForm>
                    </Content>
                </TWC:TabbedPane>
            </TWC:TabbedPanes>
                        
            <p class="PanelSaveButton DetailsFixedWidth">
		        <cp:ResourceLinkButton id="Save" runat="Server" CssClass="CommonTextButton" ResourceName="Save"></cp:ResourceLinkButton>
	        </p>                

        </FormTemplate>
    </CSHub:EditHubForm>

</asp:Content>
